import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home.vue'),
	meta: {TabbarShow: true}
  },
  {
    path: '/bill',
    name: 'bill',
    component: () => import('../views/Bill.vue'),
	meta: {TabbarShow: true}
  },
  {
    path: '/mine',
    name: 'mine',
    component: () => import('../views/Mine.vue'),
	meta: {TabbarShow: true}
  },
  {
    path: '/income',
    name: 'income',
    component: () => import('../components/Income.vue'),
  	meta: {TabbarShow: false}
  },
  {
    path: '/pay',
    name: 'pay',
    component: () => import('../components/Pay.vue'),
  	meta: {TabbarShow: false}
  },
  {
    path: '/settings',
    name: 'settings',
    component: () => import('../components/Settings.vue'),
  	meta: {TabbarShow: false}
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue'),
  	meta: {TabbarShow: false}
  },
  {
    path: '/modifypwd',
    name: 'modifypwd',
    component: () => import('../components/Modifypwd.vue'),
  	meta: {TabbarShow: false}
  },
  {
    path: '/',
    redirect:'/login'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
